﻿// JSON C# Class Generator
// http://at-my-window.blogspot.com/?page=json-class-generator

using System;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;
using TomatoSynchronizer.Store;

namespace TomatoSynchronizer.Entities 
{

    public class ProductAttributGroupEntry 
    {

        public ProductAttributGroupEntry()
        {
        }
        
		public override bool Equals(object obj)
		{
			if(obj is ProductAttributGroupEntry)
			{
				ProductAttributGroupEntry entry = (ProductAttributGroupEntry)obj;
				if(entry._name == _name && entry._module == _module && entry._status == _status && entry._value == _value)
				{
					return true;
				}
			}
			
			return false;
		}

        public ProductAttributGroupEntry(string json)
         : this(JObject.Parse(json))
        {
        }

        private JObject __jobject;
        public ProductAttributGroupEntry(JObject obj)
        {
            this.__jobject = obj;
        }                

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private int _products_attributes_values_id;
        public int products_attributes_values_id
        {
            get
            {
                if(_products_attributes_values_id == null)
                    _products_attributes_values_id = JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "products_attributes_values_id"));
                return _products_attributes_values_id;
            }
            set
            {
                _products_attributes_values_id = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private int _products_attributes_groups_id;
        public int products_attributes_groups_id
        {
            get
            {
                if(_products_attributes_groups_id == null)
                    _products_attributes_groups_id = JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "products_attributes_groups_id"));
                return _products_attributes_groups_id;
            }
            set
            {
                _products_attributes_groups_id = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private int _language_id;
        public int language_id
        {
            get
            {
                if(_language_id == null)
                    _language_id = JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "language_id"));
                return _language_id;
            }
            set
            {
                _language_id = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _status;
        public string status
        {
            get
            {
                if(_status == null)
                    _status = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "status"));
                return _status;
            }
            set
            {
                _status = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _module;
        public string module
        {
            get
            {
                if(_module == null)
                    _module = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "module"));
                return _module;
            }
            set
            {
                _module = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _name;
        public string name
        {
            get
            {
                if(_name == null)
                    _name = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "name"));
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _value;
        public string value
        {
            get
            {
                if(_value == null)
                    _value = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "value"));
                return _value;
            }
            set
            {
                _value = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private int _sort_order;
        public int sort_order
        {
            get
            {
                if(_sort_order == null)
                    _sort_order = JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "sort_order"));
                return _sort_order;
            }
            set
            {
                _sort_order = value;
            }
        }

    }
}
